import { Rule } from '@midwayjs/validate';
import { ApiProperty } from '@midwayjs/swagger';
import { BaseError as R } from '../../../common/base.error';
import { requiredString } from '../../../common/common.validate.rules';
import { BillEntity } from '../entity/bill';
import { BaseDTO } from '../../../common/base.dto';

export class BillDTO extends BaseDTO<BillEntity> {
  @ApiProperty({
    description: '核销时间',
  })
  @Rule(requiredString.error(R.validateError('核销时间为空')))
  verifyDate?: Date;

  @ApiProperty({
    description: '账单价格',
  })
  @Rule(requiredString.error(R.validateError('账单价格不能为空')))
  price?: string;
}